/**
 * Created by WB on 2017/3/20.
 */
var routers = angular.module('routers', ['ui.router']);
routers.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider){
	$stateProvider.state('course_list', {
		url:'/courseList',
		templateUrl:'./template/courseList.html',
		controller:'courseListController',
		resolve:{
			deps:['$ocLazyLoad', function($ocLazyLoad){
				return $ocLazyLoad.load('./controllers/courseListController.js');
			}]
		}
	}).state('teacherInfo', {
		url:'/teacherInfo',
		templateUrl:'./template/teacherInfo.html',
		controller:'teacherInfoController',
		resolve:{
			deps:['$ocLazyLoad', function($ocLazyLoad){
				return $ocLazyLoad.load('./controllers/teacherInfoController.js');
			}]
		}
	}).state('classroomInfo', {
		url:'/classroomInfo',
		templateUrl:'./template/classroomInfo.html',
		controller:'classroomInfoController',
		resolve:{
			deps:['$ocLazyLoad', function($ocLazyLoad){
				return $ocLazyLoad.load('./controllers/classroomInfoController.js');
			}]
		}
	}).state('studentInfo', {
		url:'/studentInfo',
		templateUrl:'./template/studentInfo.html',
		controller:'studentInfoController',
		resolve:{
			deps:['$ocLazyLoad', function($ocLazyLoad){
				return $ocLazyLoad.load('./controllers/studentInfoController.js');
			}]
		}
	}).state('systemSetting', {
		url:'/systemSetting',
		templateUrl:'./template/systemSetting.html',
		controller:'systemSettingController',
		resolve:{
			deps:['$ocLazyLoad', function($ocLazyLoad){
				return $ocLazyLoad.load('./controllers/systemSettingController.js');
			}]
		}
	});
	$urlRouterProvider.otherwise('/courseList');
}]);